(wrapped false)
duneファイルの解説に書かれているように,(wrapped false)を指定すると,トップレベルでBarモジュールが使えるようになった. code:lib/dune
(library
(name foo)
(wrapped false))
code:lib/bar.ml
let x = 4
code:output
utop # Foo.x;;
- : int = 3
utop # Bar.x;;
- : int = 4
でもこれ明らかに名前空間が汚染されるし,trueが推奨されているのも頷ける.